<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.2">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon.ico">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon.ico">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
  <link rel="stylesheet" href="/lib/pace/pace-theme-minimal.min.css">
  <script src="true"></script>
  <script>
    (function () {
        if ('') {
            if (prompt('请输入文章密码') !== '') {
                alert('密码错误！');
                if (history.length === 1) {
                    location.replace("http://zxiaoxuan.cn"); // 这里替换成你的首页
                } else {
                    history.back();
                }
            }
        }
    })();
  </script>

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"example.com","root":"/","scheme":"Mist","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":true,"show_result":true,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":true},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>



  <meta name="description" content="我可以不在校园公告解放双手的路上总会有磕磕绊绊，不过我们都会尽力解决。 关于对邮件“发生未知错误！！！”的解决，v2.1已经连夜发布">
<meta property="og:type" content="article">
<meta property="og:title" content="我可以不在校园">
<meta property="og:url" content="http://example.com/posts/2/index.html">
<meta property="og:site_name" content="Dominic">
<meta property="og:description" content="我可以不在校园公告解放双手的路上总会有磕磕绊绊，不过我们都会尽力解决。 关于对邮件“发生未知错误！！！”的解决，v2.1已经连夜发布">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://gitee.com/dominickk/picgo/raw/master/picgoCore/image-20220418013254272.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/uTools/2022213-130940-1644728979852.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802134532161-1627956867319.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802140021903.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802140437482.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802140839373.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802141018230.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802141144696.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802141332680.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802141716446.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802145622192.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802152812320.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802152944128.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802153128652.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/uTools/2022213-132154-1644729713565.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/uTools/202234-153629-6a3b683f81c3935e90edc30217daced.jpg">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/uTools/202234-153633-5bdfa20bf3ae5b6a1c4332974b51b7d.jpg">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802160948779.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802161241550.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802161459839.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803080018644.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803080356200.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803081027997.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803081034094.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803083310441.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803083504283.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803090822826.png">
<meta property="og:image" content="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803091352067.png">
<meta property="article:published_time" content="2021-08-14T09:10:46.000Z">
<meta property="article:modified_time" content="2022-04-17T17:56:55.608Z">
<meta property="article:author" content="Dominic">
<meta property="article:tag" content="Python">
<meta property="article:tag" content="我在校园">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://gitee.com/dominickk/picgo/raw/master/picgoCore/image-20220418013254272.png">

<link rel="canonical" href="http://example.com/posts/2/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>我可以不在校园 | Dominic</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">Dominic</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-todolist">

    <a href="/todolist" rel="section"><i class="fa fa-list fa-fw"></i>todolist</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://example.com/posts/2/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/Dominic.jpg">
      <meta itemprop="name" content="Dominic">
      <meta itemprop="description" content="写文档使我快乐🚮">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Dominic">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          我可以不在校园
        </h1>

        <div class="post-meta">
          
            <i class="fa fa-thumb-tack"></i>
            <font color=7D26CD>置顶</font>
            <span class="post-meta-divider">|</span>
          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2021-08-14 17:10:46" itemprop="dateCreated datePublished" datetime="2021-08-14T17:10:46+08:00">2021-08-14</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2022-04-18 01:56:55" itemprop="dateModified" datetime="2022-04-18T01:56:55+08:00">2022-04-18</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E5%B0%8F%E6%B4%BB%E5%A4%A7%E6%95%B4/" itemprop="url" rel="index"><span itemprop="name">小活大整</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="我可以不在校园"><a href="#我可以不在校园" class="headerlink" title="我可以不在校园"></a>我可以不在校园</h1><h1 id="公告"><a href="#公告" class="headerlink" title="公告"></a>公告</h1><p>解放双手的路上总会有磕磕绊绊，不过我们都会尽力解决。</p>
<p>关于对邮件“发生未知错误！！！”的解决，v2.1已经连夜发布</p>
<span id="more"></span>

<p>直达电梯：在v2.0（v1.0均可）的基础上，在<code>self.data</code>中添加<code>&quot;timestampHeader&quot;: int(time.time()),</code>即可，如图：</p>
<img src="https://gitee.com/dominickk/picgo/raw/master/picgoCore/image-20220418013254272.png" alt="image-20220418013254272" style="zoom: 67%;" />

<p>欢迎关注我的个人博客：<a target="_blank" rel="noopener" href="https://dominickk.gitee.io/">DominicKK</a></p>
<p><strong>- 2022.04.18  01:33 -</strong></p>
<hr>
<h2 id="资源包"><a href="#资源包" class="headerlink" title="资源包"></a>资源包</h2><p>点击链接下载：<br><a target="_blank" rel="noopener" href="https://dominic.lanzouq.com/iV72703dnewb">代码包</a><br><a target="_blank" rel="noopener" href="https://dominic.lanzouq.com/ixZo903dng3e">工具包</a><br><a target="_blank" rel="noopener" href="https://dominic.lanzouq.com/iQrKJ03dng4f">回顾旧版</a></p>
<p><strong>友情提示：</strong> 本文章及相关代码仅作为学习使用，使用者若以此进行盈利等，造成后果由使用者自负，均与作者无关。健康生活，认真打卡。作者<a href="tencent://AddContact/?fromId=45&fromSubId=1&subcmd=all&uin=3330900358&website=www.oicqzone.com">QQ 3330900358</a>，若学习过程中有相关疑问，欢迎交流。本文在Gitee同步发布：<a target="_blank" rel="noopener" href="https://gitee.com/DominicKK/autocheck">https://gitee.com/DominicKK/autocheck</a></p>
<hr>
<p>[TOC]</p>
<hr>
<p>​    本教程灵感来源于生活。</p>
<p>​    此版本为2.0。版本1.0使用抓包获取到的 jwsession 进行登录，而此版本使用账号密码登录，以解决部分用户出现 jwsession 更新频率快的问题。版本1.0的弊端：每次 jwsession 后都需要重新抓取，再写入代码；版本2.0的弊端：代码时而会出现“账号密码错误”的报错，具体情况已在<strong>《新版必读.txt》</strong>中列出，<strong>建议阅读</strong>。两个版本各有利弊，均可正常使用，根据自己的实际情况使用即可。</p>
<p>​    <strong>所有文件以及相关代码已在文件列表上传，下载即可使用</strong></p>
<img src="https://gitee.com/dominic548/picgo/raw/master/uTools/2022213-130940-1644728979852.png" alt="image-20220213130917422" style="zoom:67%;" />

<h3 id="一、Fiddler-抓包工具"><a href="#一、Fiddler-抓包工具" class="headerlink" title="一、Fiddler 抓包工具"></a>一、Fiddler 抓包工具</h3><h4 id="1-安装和配置"><a href="#1-安装和配置" class="headerlink" title="1.安装和配置"></a>1.安装和配置</h4><p>安装包下载：Fiddler 安装包和 Fiddler 证书生成器</p>
<p>蓝奏云链接：<a target="_blank" rel="noopener" href="https://dominic.lanzouq.com/iKszLzyh5gh">https://dominic.lanzouq.com/iKszLzyh5gh</a></p>
<p>下载后解压，先双击 <code>FiddlerSetup.exe</code> 进行安装，另一个是证书生成器，暂时不用。</p>
<p>打开 Fiddler ，点击工具栏中的 <code>Tools</code> → <code>Options</code></p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802134532161-1627956867319.png" alt="1.1.1"  />

<p>点击 <code>HTTPS</code> 标签，勾选框住的三项，然后点击右边的 <code>Actions</code>，选择第二项，会弹出一个弹窗，点击确定，之后点击 <code>OK</code> 完成设置</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802140021903.png" alt="1.1.2"  />

<p>这时会发现桌面上多了一个证书文件（如下图），接下来马上会用到</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802140437482.png" alt="1.1.3"  />

<p>打开电脑上任何一个浏览器，在这里我用的是 win10 自带的 Edge，打开设置，找到<code>证书管理</code>，实在找不到也可以直接搜索</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802140839373.png" alt="1.1.4"  />

<p>点击<code>管理证书</code>，点击<code>导入</code>进入证书导入向导</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802141018230.png" alt="1.1.5" style="zoom:67%;" />

<p>点击<code>下一页</code>继续</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802141144696.png" alt="1.1.6" style="zoom:67%;" />

<p>点击<code>浏览</code>，选择要导入的文件</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802141332680.png" alt="1.1.7" style="zoom:67%;" />

<p>在桌面找到刚刚导出的证书文件，点一下证书文件，选择<code>打开</code></p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802141716446.png" alt="1.1.8" style="zoom:67%;" />

<p>之后一直点击<code>下一步</code>，直到完成证书导入。到这里配置工作基本完成，可以进行抓包了，刚刚导出在桌面的证书文件也可以删除</p>
<h4 id="2-抓包"><a href="#2-抓包" class="headerlink" title="2.抓包"></a>2.抓包</h4><p>接下来从微信电脑端打开我在校园小程序，然后打开日检日报或者健康打卡，会发现 Fiddler 中显示了很多内容，我们找到<code>student.wozaixiaoyuan.com</code>这一行，双击打开，在右边选择<code>Headers</code>标签，复制 <code>User-Agent（设备信息）</code>、<code>Referer（学校信息）</code>。</p>
<p><img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802145622192.png" alt="1.2.1"></p>
<p>复制的内容可以发给你的工具人小伙伴，或者你的小号，总之先保留下来备用。</p>
<h3 id="二、QQ邮箱"><a href="#二、QQ邮箱" class="headerlink" title="二、QQ邮箱"></a>二、QQ邮箱</h3><h4 id="获取授权码"><a href="#获取授权码" class="headerlink" title="获取授权码"></a>获取授权码</h4><p>用QQ邮箱发件也需要登录，不是用账号密码，而是授权码（更安全），接下来获取授权码</p>
<p>进入QQ邮箱网页版，进入<code>设置</code>，选择<code>账户</code></p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802152812320.png" alt="2.1.1" style="zoom:67%;" />

<p>往下翻找到 <code>POP3/SMTP服务</code>，确保第一项是<code>已开启</code>状态，如果不是，点击后面的开启，然后选择下面的<code>生成授权码</code></p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802152944128.png" alt="2.1.2" style="zoom:67%;" />

<p>根据提示验证后，得到授权码，和抓包步骤一样，把授权码复制保存下来备用。</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802153128652.png" alt="2.1.3" style="zoom:67%;" />

<h3 id="三、Python-代码"><a href="#三、Python-代码" class="headerlink" title="三、Python 代码"></a>三、Python 代码</h3><h4 id="1-获取位置信息"><a href="#1-获取位置信息" class="headerlink" title="1.获取位置信息"></a>1.获取位置信息</h4><p>代码中直接会填入打卡的地址，所以代码正常运行后，即使人不在学校，打卡也会在学校，这时候就要留意会不会穿帮了。</p>
<p>需要填写经纬度，可以通过百度的拾取坐标系统获取：<a target="_blank" rel="noopener" href="https://api.map.baidu.com/lbsapi/getpoint/index.html">拾取坐标系统 (baidu.com)</a></p>
<img src="https://gitee.com/dominic548/picgo/raw/master/uTools/2022213-132154-1644729713565.png" alt="3.1.1" style="zoom:67%;" />

<h4 id="2-打卡题目"><a href="#2-打卡题目" class="headerlink" title="2.打卡题目"></a>2.打卡题目</h4><p>在代码文件中，预设了基本通用的题目答案，但打卡题目不一定都相同，若和下图的题目相同，则无需修改代码。<strong>否则一定要修改代码，请<a href="tencent://AddContact/?fromId=45&fromSubId=1&subcmd=all&uin=3330900358&website=www.oicqzone.com">QQ联系作者</a>。</strong></p>
<img src="https://gitee.com/dominic548/picgo/raw/master/uTools/202234-153629-6a3b683f81c3935e90edc30217daced.jpg" style="zoom:50%;" />

<img src="https://gitee.com/dominic548/picgo/raw/master/uTools/202234-153633-5bdfa20bf3ae5b6a1c4332974b51b7d.jpg" style="zoom:50%;" />

<h4 id="3-日检日报"><a href="#3-日检日报" class="headerlink" title="3.日检日报"></a>3.日检日报</h4><p>代码中的“xxx”部分都需要手动填入，其中包括上面步骤中保存的那些内容，<strong>代码文件已上传至文件列表</strong>，<strong>下载即可编辑使用</strong>。</p>
<h4 id="4-健康打卡"><a href="#4-健康打卡" class="headerlink" title="4.健康打卡"></a>4.健康打卡</h4><p>代码中的“xxx”部分都需要手动填入，其中包括上面步骤中保存的那些内容，<strong>代码文件已上传至文件列表</strong>，<strong>下载即可编辑使用</strong>。</p>
<h4 id="5-定位签到"><a href="#5-定位签到" class="headerlink" title="5.定位签到"></a>5.定位签到</h4><p>定位签到由作者 <a target="_blank" rel="noopener" href="https://gitee.com/smallway"><strong>小白</strong></a> 协助完成，使用方法可参考本教程的 v1.0 版本，点击链接跳转：<a target="_blank" rel="noopener" href="https://gitee.com/smallway/autosign"> 我在校园定位签到</a>。</p>
<h3 id="四、腾讯云函数"><a href="#四、腾讯云函数" class="headerlink" title="四、腾讯云函数"></a>四、腾讯云函数</h3><p>注册过程就不再赘述，注册完记得完成实名认证，这里给出腾讯云官网链接：<a target="_blank" rel="noopener" href="https://cloud.tencent.com/">腾讯云(tencent.com)</a></p>
<h4 id="1-使用云函数"><a href="#1-使用云函数" class="headerlink" title="1.使用云函数"></a>1.使用云函数</h4><p>进入腾讯云先登录，搜索云函数</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802160948779.png" alt="4.1.1" style="zoom:67%;" />

<p>管理控制台</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802161241550.png" alt="4.1.2" style="zoom:67%;" />

<p>函数服务 → 新建</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210802161459839.png" alt="4.1.3" style="zoom:67%;" />

<p>选择自定义创建，函数名称可以改一下，方便区分，这里用健康打卡做例子，由于名称不能写中文，所以就写了健康打卡的拼音缩写</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803080018644.png" alt="4.1.4" style="zoom:67%;" />

<p>往下翻，函数代码选择在线编辑，把刚刚编辑好的代码粘贴在这里</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803080356200.png" alt="4.1.5" style="zoom:67%;" />

<p>其他设置保持默认即可，然后点击完成。这样就把代码部署在腾讯云上了，可以尝试运行一下，直接点击测试按钮，立马就能收到一封邮件，提示打卡状态</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803081027997.png" alt="4.1.6" style="zoom:67%;" />

<p><img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803081034094.png" alt="image-20210803081034094"></p>
<h4 id="2-定时触发"><a href="#2-定时触发" class="headerlink" title="2.定时触发"></a>2.定时触发</h4><p>设置定时触发之后，就可以按照自己的时间定时运行一次代码，这样就解放了双手</p>
<p>触发管理 → 创建触发器</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803083310441.png" alt="4.1.7" style="zoom:67%;" />

<p>触发周期选择自定义，这里要输入 Cron 表达式，健康打卡是每天一次，只要过了零点就可以打卡，所以 Cron 表达式是 <code>0 01 00 * * * *</code>，表示每天00:01运行一次代码；日检日报是每天三次，这里根据我们学校的时间，我写的是 <code>0 35 6,12,19 * * * *</code>，表示每天6:35、12:35、19:35各运行一次；其他设置保持默认即可，点击提交。</p>
<p>教程到这里就结束了，如果需要其他时间打卡，可以直接更改 Cron表达式，为了方便大家更改，关于 Cron 表达式的语法在下面也讲解一下</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803083504283.png" alt="4.1.8" style="zoom:67%;" />

<h3 id="五、Q-amp-A"><a href="#五、Q-amp-A" class="headerlink" title="五、Q&amp;A"></a>五、Q&amp;A</h3><p>最后在这里放一个问答板块，如果大家有什么问题可以在评论区提问（评论区可能回复不及时，推荐使用qq联系），我会定期更新在这里</p>
<h4 id="1-Cron表达式"><a href="#1-Cron表达式" class="headerlink" title="1.Cron表达式"></a>1.Cron表达式</h4><p>Cron表达式有7个字段，以空格分割</p>
<table>
<thead>
<tr>
<th align="left">第一位</th>
<th align="left">第二位</th>
<th align="left">第三位</th>
<th align="left">第四位</th>
<th align="left">第五位</th>
<th align="left">第六位</th>
<th align="left">第七位</th>
</tr>
</thead>
<tbody><tr>
<td align="left">秒</td>
<td align="left">分钟</td>
<td align="left">小时</td>
<td align="left">日</td>
<td align="left">月</td>
<td align="left">星期</td>
<td align="left">年</td>
</tr>
</tbody></table>
<p>每一位都有一定的取值范围</p>
<table>
<thead>
<tr>
<th align="left">字段</th>
<th align="left">值</th>
<th align="left">通配符</th>
</tr>
</thead>
<tbody><tr>
<td align="left">秒</td>
<td align="left">0 - 59的整数</td>
<td align="left">, - * /</td>
</tr>
<tr>
<td align="left">分钟</td>
<td align="left">0 - 59的整数</td>
<td align="left">, - * /</td>
</tr>
<tr>
<td align="left">小时</td>
<td align="left">0 - 23的整数</td>
<td align="left">, - * /</td>
</tr>
<tr>
<td align="left">日</td>
<td align="left">1 - 31的整数（需要考虑月的天数）</td>
<td align="left">, - * /</td>
</tr>
<tr>
<td align="left">月</td>
<td align="left">1 - 12的整数或 JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC</td>
<td align="left">, - * /</td>
</tr>
<tr>
<td align="left">星期</td>
<td align="left">0 - 6的整数或 SUN,MON,TUE,WED,THU,FRI,SAT。其中0指星期日，1指星期一，以此类推</td>
<td align="left">, - * /</td>
</tr>
<tr>
<td align="left">年</td>
<td align="left">1970 - 2099的整数</td>
<td align="left">, - * /</td>
</tr>
</tbody></table>
<p>举例说明：</p>
<table>
<thead>
<tr>
<th align="center">日检日报</th>
<th align="center">0</th>
<th align="center">35</th>
<th align="center">6，12，19</th>
<th align="center">*</th>
<th align="center">*</th>
<th align="center">*</th>
<th align="center">*</th>
</tr>
</thead>
<tbody><tr>
<td align="center">含义</td>
<td align="center">0秒</td>
<td align="center">35分</td>
<td align="center">6时，12时，19时</td>
<td align="center">每日</td>
<td align="center">每月</td>
<td align="center">每星期每天</td>
<td align="center">每年</td>
</tr>
</tbody></table>
<table>
<thead>
<tr>
<th align="center">健康打卡</th>
<th align="center">0</th>
<th align="center">01</th>
<th align="center">00</th>
<th align="center">*</th>
<th align="center">*</th>
<th align="center">*</th>
<th align="center">*</th>
</tr>
</thead>
<tbody><tr>
<td align="center">含义</td>
<td align="center">0秒</td>
<td align="center">01分</td>
<td align="center">0时</td>
<td align="center">每日</td>
<td align="center">每月</td>
<td align="center">每星期每天</td>
<td align="center">每年</td>
</tr>
</tbody></table>
<h4 id="2-如何第一时间收到QQ邮件"><a href="#2-如何第一时间收到QQ邮件" class="headerlink" title="2.如何第一时间收到QQ邮件"></a>2.如何第一时间收到QQ邮件</h4><p>如果每次都打开邮箱网页查看打卡状态，那自然很麻烦，最简单的方法就是手机下载QQ邮箱客户端，并打开消息提醒，这样每次代码运行结束都能及时收到打卡状态。如果不想下载软件，也可以用微信的QQ邮件提醒，不过这需要一些设置：</p>
<p>首先确保微信和QQ号已经绑定，找到【设置】-【账号与安全】-【更多安全设置】来绑定QQ号</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803090822826.png" alt="5.1.1" style="zoom:67%;" />

<p>绑定好之后，点击微信上方的搜索，搜“QQ邮箱提醒”功能并启用，这样就可以在微信收到邮件了</p>
<img src="https://gitee.com/dominic548/picgo/raw/master/Typora/image-20210803091352067.png" alt="5.1.2" style="zoom:67%;" />

<h4 id="3-下载了QQ邮箱APP后，邮箱公众号收不到邮箱消息了"><a href="#3-下载了QQ邮箱APP后，邮箱公众号收不到邮箱消息了" class="headerlink" title="3.下载了QQ邮箱APP后，邮箱公众号收不到邮箱消息了"></a>3.下载了QQ邮箱APP后，邮箱公众号收不到邮箱消息了</h4><p>进入qq邮箱app，点开头像，选择新邮件提醒，拉到下面选择你的qq邮箱账号，然后关闭下面的仅在qq邮箱客户端提醒，然后公众号就可以正常接收信息了。</p>
<h4 id="4-errorcode"><a href="#4-errorcode" class="headerlink" title="4.errorcode"></a>4.errorcode</h4><p>若出现类似于<code>&#123;&quot;errorCode&quot;:1,&quot;errorMessage&quot;:&quot;Traceback (most recent call last):\n ......,&quot;statusCode&quot;:443&#125; </code>的错误，可尝试重新建一个云函数，即重复<code>步骤四</code>，当然也可以联系作者帮忙解决。</p>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/Python/" rel="tag"><i class="fa fa-tag"></i>Python</a>
              <!-- # -->
              <a href="/tags/%E6%88%91%E5%9C%A8%E6%A0%A1%E5%9B%AD/" rel="tag"><i class="fa fa-tag"></i>我在校园</a>
              <!-- # -->
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item"></div>
      <div class="post-nav-item">
    <a href="/posts/16107/" rel="next" title="Hello World">
      Hello World <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E6%88%91%E5%8F%AF%E4%BB%A5%E4%B8%8D%E5%9C%A8%E6%A0%A1%E5%9B%AD"><span class="nav-number">1.</span> <span class="nav-text">我可以不在校园</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%85%AC%E5%91%8A"><span class="nav-number">2.</span> <span class="nav-text">公告</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E8%B5%84%E6%BA%90%E5%8C%85"><span class="nav-number">2.1.</span> <span class="nav-text">资源包</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%80%E3%80%81Fiddler-%E6%8A%93%E5%8C%85%E5%B7%A5%E5%85%B7"><span class="nav-number">2.1.1.</span> <span class="nav-text">一、Fiddler 抓包工具</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-%E5%AE%89%E8%A3%85%E5%92%8C%E9%85%8D%E7%BD%AE"><span class="nav-number">2.1.1.1.</span> <span class="nav-text">1.安装和配置</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-%E6%8A%93%E5%8C%85"><span class="nav-number">2.1.1.2.</span> <span class="nav-text">2.抓包</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BA%8C%E3%80%81QQ%E9%82%AE%E7%AE%B1"><span class="nav-number">2.1.2.</span> <span class="nav-text">二、QQ邮箱</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E8%8E%B7%E5%8F%96%E6%8E%88%E6%9D%83%E7%A0%81"><span class="nav-number">2.1.2.1.</span> <span class="nav-text">获取授权码</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%89%E3%80%81Python-%E4%BB%A3%E7%A0%81"><span class="nav-number">2.1.3.</span> <span class="nav-text">三、Python 代码</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-%E8%8E%B7%E5%8F%96%E4%BD%8D%E7%BD%AE%E4%BF%A1%E6%81%AF"><span class="nav-number">2.1.3.1.</span> <span class="nav-text">1.获取位置信息</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-%E6%89%93%E5%8D%A1%E9%A2%98%E7%9B%AE"><span class="nav-number">2.1.3.2.</span> <span class="nav-text">2.打卡题目</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-%E6%97%A5%E6%A3%80%E6%97%A5%E6%8A%A5"><span class="nav-number">2.1.3.3.</span> <span class="nav-text">3.日检日报</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#4-%E5%81%A5%E5%BA%B7%E6%89%93%E5%8D%A1"><span class="nav-number">2.1.3.4.</span> <span class="nav-text">4.健康打卡</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#5-%E5%AE%9A%E4%BD%8D%E7%AD%BE%E5%88%B0"><span class="nav-number">2.1.3.5.</span> <span class="nav-text">5.定位签到</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%9B%9B%E3%80%81%E8%85%BE%E8%AE%AF%E4%BA%91%E5%87%BD%E6%95%B0"><span class="nav-number">2.1.4.</span> <span class="nav-text">四、腾讯云函数</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-%E4%BD%BF%E7%94%A8%E4%BA%91%E5%87%BD%E6%95%B0"><span class="nav-number">2.1.4.1.</span> <span class="nav-text">1.使用云函数</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-%E5%AE%9A%E6%97%B6%E8%A7%A6%E5%8F%91"><span class="nav-number">2.1.4.2.</span> <span class="nav-text">2.定时触发</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BA%94%E3%80%81Q-amp-A"><span class="nav-number">2.1.5.</span> <span class="nav-text">五、Q&amp;A</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-Cron%E8%A1%A8%E8%BE%BE%E5%BC%8F"><span class="nav-number">2.1.5.1.</span> <span class="nav-text">1.Cron表达式</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-%E5%A6%82%E4%BD%95%E7%AC%AC%E4%B8%80%E6%97%B6%E9%97%B4%E6%94%B6%E5%88%B0QQ%E9%82%AE%E4%BB%B6"><span class="nav-number">2.1.5.2.</span> <span class="nav-text">2.如何第一时间收到QQ邮件</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-%E4%B8%8B%E8%BD%BD%E4%BA%86QQ%E9%82%AE%E7%AE%B1APP%E5%90%8E%EF%BC%8C%E9%82%AE%E7%AE%B1%E5%85%AC%E4%BC%97%E5%8F%B7%E6%94%B6%E4%B8%8D%E5%88%B0%E9%82%AE%E7%AE%B1%E6%B6%88%E6%81%AF%E4%BA%86"><span class="nav-number">2.1.5.3.</span> <span class="nav-text">3.下载了QQ邮箱APP后，邮箱公众号收不到邮箱消息了</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#4-errorcode"><span class="nav-number">2.1.5.4.</span> <span class="nav-text">4.errorcode</span></a></li></ol></li></ol></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Dominic"
      src="/images/Dominic.jpg">
  <p class="site-author-name" itemprop="name">Dominic</p>
  <div class="site-description" itemprop="description">写文档使我快乐🚮</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">6</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">6</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://gitee.com/DominicKK" title="Gitee → https:&#x2F;&#x2F;gitee.com&#x2F;DominicKK" rel="noopener" target="_blank"><i class="fab fa-git fa-fw"></i>Gitee</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://github.com/Dominic548" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;Dominic548" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:Dominickk548@outlook.com" title="E-Mail → mailto:Dominickk548@outlook.com" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
      </span>
  </div>



      </div>

      
      
        <div class="links-of-blogroll motion-element links-of-blogroll-block">
          <div class="links-of-blogroll-title">
            <!-- modify icon to fire by szw -->
            <i class="fa fa-history fa-" aria-hidden="true"></i>
            近期文章
          </div>
          <ul class="links-of-blogroll-list">
            
            
              <li class="recent_posts_li">
                <a href="/" title="" target="_blank"></a>
              </li>
            
              <li class="recent_posts_li">
                <a href="/" title="" target="_blank"></a>
              </li>
            
              <li class="recent_posts_li">
                <a href="/" title="" target="_blank"></a>
              </li>
            
              <li class="recent_posts_li">
                <a href="/" title="" target="_blank"></a>
              </li>
            
              <li class="recent_posts_li">
                <a href="/" title="" target="_blank"></a>
              </li>
            
          </ul>
        </div>
      


    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Dominic</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://mist.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Mist</a> 强力驱动
  </div>

        








      </div>
      <div class="powered-by">
        <i class="fa fa-user-md"></i><span id="busuanzi_container_site_uv">
          本站访客数:<span id="busuanzi_value_site_uv"></span>
        </span>
      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  




  
<script src="/js/local-search.js"></script>













  

  

</body>
</html>
